﻿using System;
using System.Collections.Generic;
using System.Collections;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using BLL;
using Models;

namespace Web
{
    public partial class about : System.Web.UI.Page
    {
        public string content = "";
        protected void Page_Load(object sender, EventArgs e)
        {
            IntroBindData();
            BindAboutContent();
            BindAboutPics();
            ContactBindData();
            Page.Title = "关于";
        }

        public void BindAboutContent()
        {
            content = AboutAndCareerContentLogic.GetAboutContent();    
        }
        public void BindAboutPics()
        {
            List<AboutAndCareerPic> pics = AboutAndCareerPicLogic.GetAboutPicList();
            AboutPicRpt.DataSource = pics;
            AboutPicRpt.DataBind();
        }
        public void IntroBindData()
        {
            //List<IntroductionInfo> list = IntroductionLogic.GetIntroductionInfo();
            //if (list == null)
            //{
            //    list = new List<IntroductionInfo>();
            //    list.Add(new IntroductionInfo());
            //}

            //IntroList.DataSource = list;
            //IntroList.DataBind();
        }
        public void ContactBindData()
        {
            List<ContactInfo> contactlist = ContactInfoLogic.GetContactInfo();
            if (contactlist == null)
            {
                contactlist = new List<ContactInfo>();
                contactlist.Add(new ContactInfo());
            }
            contactReperter.DataSource = contactlist;
            contactReperter.DataBind();
        }
    }
}
